import { IContext, IParam } from '@/core';
import { PropType } from 'vue';
declare type methodType = 'post' | 'POST' | 'PUT' | 'PATCH' | 'put' | 'patch';

export const fileUploadProps = {
	name: {
		type: String,
	},
	data: {
		type: Object as PropType<IParam>,
		default: {},
	},
	value: {
		type: String,
	},
	context: {
		type: Object as PropType<IContext>,
		default: {},
	},
	viewParams: {
		type: Object as PropType<IParam>,
		default: {},
	},
	uploadParams: {
		type: Object as PropType<IParam>,
		default: {},
	},
	exportParams: {
		type: Object as PropType<IParam>,
		default: {},
	},
	isFile: {
		type: Boolean,
		default: true,
	},
	isRaw: {
		type: Boolean,
		default: false,
	},
	tooltip: {
		type: String,
	},
	//上传请求的 http 方法
	method: {
		type: String as PropType<methodType>,
		default: 'post',
	},
	//是否展示文件列表
	showFileList: {
		type: Boolean,
		default: true,
	},
};
